From: Florian Müllner Date: Wed, 14 Aug 2019 11:14:23 +0000 (+0200) Subject: ci: Ensure eslint output exists X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~514 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=caa50dc1a3e6a3772318f892c011821f0f89ad79;p=gnome-shell.git ci: Ensure eslint output exists We are a long time away from an error-free eslint run, but when we get there eventually, let's not trip over non-existent files ... https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/730 --- diff --git a/.gitlab-ci/run-eslint.sh b/.gitlab-ci/run-eslint.sh index ae4aee979..edcdfc1fd 100755 --- a/.gitlab-ci/run-eslint.sh +++ b/.gitlab-ci/run-eslint.sh @@ -16,8 +16,14 @@ run_eslint() { ARGS_LEGACY='--config lint/eslintrc-legacy.json' local extra_args=ARGS_$1 - local output=OUTPUT_$1 - eslint -f unix ${!extra_args} -o ${!output} js + local output_var=OUTPUT_$1 + local output=${!output_var} + + # ensure output exists even if eslint doesn't report any errors + mkdir -p $(dirname $output) + touch $output + + eslint -f unix ${!extra_args} -o $output js } list_commit_range_additions() {